/** 获取模式对应的颜色 堆垛机 货位监控的堆垛机srm 红色设备异常 黄色设备空闲 绿色 生产
 * @param {*} mode  模式
 * @returns  颜色字符
 */
export function GetModeColor(mode) {
  let color = '#999'
  switch (mode) {
    case 1:
      color = '#67C23A'
      break
    case 2:
      color = '#0ff'
      break
    case 3:
      color = '#409EFF'
      break
    case 4:
      color = '#F56C6C'
      break
    case 5:
      color = '#E6A23C'
      break
    case 6:
      color = '#67C23A'
      break
    default:
      break
  }
  return color
}

/** 获取rgv cv 提升机 模式对应的颜色
 * @param {*} mode  模式
 * @returns  颜色字符
 */
export function GetCvRgvTsjModeColor(mode) {
  let color = '#999'
  switch (mode) {
    case 1:
      color = '#67C23A'
      break
    case 2:
      color = '#0ff'
      break
    case 3:
      color = '#409EFF'
      break
    case 4:
      color = '#F56C6C'
      break
    case 5:
      color = '#E6A23C'
      break
    case 6:
      color = '#67C23A'
      break
    case 7:
      color = '#67C23A'
      break
    default:
      break
  }
  return color
}
/** 货位监控 货架shelf 获取模式对应的颜色
 * @param {*} state  模式
 * @returns  颜色字符
 */
export function GetStateColor(state) {
  let color = '#999'
  switch (state) {
    case '0':
      color = '#ffffff'
      break
    case '1':
      color = '#ffffff'
      break
    case '2':
      color = '#67C23A'
      break
    case '3':
      color = '#ffff00'
      break
    case '4':
      color = '#ffe793'
      break
    case '7':
      color = '#d5ff93'
      break
    default: ''
      break
  }
  return color
}
/** raster光栅的颜色 */
export const rasterColor = {
  errorFlag: 'red',
  bypassFlag: '#909399',
  default: '#F99F00'
}
/** 货架锁定的颜色 */
export const isLockColor = '#303133'
/** 货架边框 有备注 基准货架的颜色 */
export const strokeColor = {
  default: '#000000',
  remark: '#ff0000',
  basicShelf: '#E6A23C'
}
/** 设置货架区域的颜色
 * @param {*} wcsZone  模式
 * @returns  颜色字符
 */
export function GetShelfColor(wcsZone) {
  let color = '#000000'
  switch (wcsZone) {
    case 'OnlyZone1':
      color = '#548235'
      break
    case 'OnlyZone2':
      color = '#548235'
      break
    case 'UseZone1':
      color = '#000000'
      break
    case 'UseZone2':
      color = '#000000'
      break
    case 'ShareZone':
      color = '#548235'
      break
    default:
      break
  }
  return color
}
